import socket
server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
address = ('172.30.1.100', 9999)
server_socket.bind(address)
server_socket.listen(5)
client_socket, client_address = server_socket.accept()
print("我们收到{}的连接".format(client_address))
while True:
    data = client_socket.recv(1024)
    if not data:
        break
    decoded_data = data.decode('utf-8')
    print("客户端说：{}".format(decoded_data))
    response = input("服务端回应：")
    client_socket.send(response.encode('utf-8'))
client_socket.close()
server_socket.close()